<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue';
const dts = ref('');
let task: any = null
onMounted(() => {
  task = setInterval(() => {
    dts.value = KdaLibrary.timeFmt(Date.now())
  }, 1000)
});
onUnmounted(() => {
  task ?? clearInterval(task)
});
</script>

<template>
  <div>
    <el-button type="primary">Web2</el-button>
    <h1>This is Web2</h1>
    <div>This from library {{ dts }}</div>

    <!-- import in index.html, and register in main.ts -->
    <KdaButton />
  </div>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
